package com.jtbd.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 客户孩子表
 *
 * @TableName customer_children
 */
@TableName(value = "customer_children")
@Data
@Schema(description = "客户孩子表")
public class CustomerChildren {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    @Schema(description = "客户孩子id")
    private Long id;

    /**
     * 客户id
     */
    @Schema(description = "客户id")
    private Long customerId;

    /**
     * 孩子名称
     */
    @Schema(description = "孩子名称")
    private String childrenName;

    /**
     * 孩子生日
     */
    @Schema(description = "孩子生日")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date childrenBirthday;

    /**
     * 孩子性别 0:男 1:女
     */
    @Schema(description = "孩子性别 0:男 1:女")
    private Integer childrenSex;

    /**
     * 孩子状态 0:正常 1:异常
     */
    @Schema(description = "孩子状态 0:正常 1:异常")
    private Integer childrenStatus;

    /**
     * 孩子年级id
     */
    @Schema(description = "孩子年级id")
    private Integer childrenGradeId;

    /**
     * 孩子年级
     */
    @Schema(description = "孩子年级")
    private String childrenGradeName;

    /**
     * 孩子关注的科目ids
     */
    @Schema(description = "孩子关注的科目ids")
    @TableField(typeHandler = com.jtbd.handler.mybatis.ArrayListLongTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private List<Long> childrenSubjectIds;

    /**
     * 孩子关注的科目names
     */
    @Schema(description = "孩子关注的科目names")
    @TableField(typeHandler = com.jtbd.handler.mybatis.ArrayListStringTypeHandler.class, jdbcType = JdbcType.VARCHAR)
    private List<String> childrenSubjectNames;

    /**
     * 孩子学校
     */
    @Schema(description = "孩子学校")
    private String childrenSchool;

    /**
     * 孩子备注
     */
    @Schema(description = "孩子备注")
    private String childrenRemark;

    /**
     * 孩子地址
     */
    @Schema(description = "孩子地址")
    private String childrenAddress;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private Date updateTime;

    /**
     * 创建人
     */
    @Schema(description = "创建人")
    private Long createId;

    /**
     * 更新人
     */
    @Schema(description = "更新人")
    private Long updateId;
}